package com.zg.api.domain.req;

import com.zg.common.core.req.EditReq;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * <p>Description: </p>
 *
 * @author zhanfeng.liang
 * @since 2025/6/16 20:13
 */

@Data
@ApiModel
public class ApiInfoEditReq extends EditReq {

    /**
     * API名称
     */
    @ApiModelProperty(value = "API名称", required = true)
    @NotEmpty(message = "API名称不能为空")
    private String apiName;

    /**
     * API编码（唯一标识）
     */
    @ApiModelProperty(value = "API编号", required = true)
    @NotEmpty(message = "API编号不能为空")
    private String apiCode;

    /**
     * 请求方式
     */
    @ApiModelProperty(value = "请求方式", required = true)
    @NotEmpty(message = "请求不能为空")
    private String method;

    /**
     * 请求URL
     */
    @ApiModelProperty(value = "请求URL", required = true)
    @NotEmpty(message = "请求URL不能为空")
    private String url;

    /**
     * 版本号
     */
    @ApiModelProperty(value = "版本号", required = true)
    @NotEmpty(message = "版本号不能为空")
    private String version;

    /**
     * 状态（1-启用，0-禁用）
     */
    private Integer status;

    /**
     * 所属分类ID
     */
    @ApiModelProperty(value = "所属分类", required = true)
    @NotNull(message = "所属分类不能为空")
    private Long categoryId;

    /**
     * 所属服务ID
     */
    @ApiModelProperty(value = "所属服务", required = true)
    @NotNull(message = "所属服务不能为空")
    private Long serviceId;



    /**
     * 参数
     */
    @ApiModelProperty(value = "参数", required = true)
    private String param;

    /**
     * 示例
     */
    @ApiModelProperty(value = "示例", required = true)
    private String example;

    @ApiModelProperty(value = "备注")
    private String intro;
}
